| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | function deletePoll($pollEl) { |
||
| 2 | var str = t('polls', 'Do you really want to delete that poll (new)?') + '\n\n' + $($pollEl).attr('data-value'); |
||
| 3 | if (confirm(str)) { |
||
| 4 | var form = document.form_delete_poll; |
||
| 5 | var hiddenId = document.createElement("input"); |
||
| 6 | hiddenId.setAttribute("name", "pollId"); |
||
| 7 | hiddenId.setAttribute("type", "hidden"); |
||
| 8 | form.appendChild(hiddenId); |
||
| 9 | form.elements.pollId.value = $pollEl.id.split('_')[2]; |
||
| 10 | form.submit(); |
||
| 11 | } |
||
| 12 | } |
||
| 13 | |||
| 14 |